package com.weds.frame.mq.config.mqtt;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Description:
 * Author: LiuWenQing
 * Datetime: 2023/3/31 14:59
 */
@ConfigurationProperties(prefix = "mqtt")
@Data
public class MqttSenderConfig {

    private String username;

    private String password;

    private String url;

    private Producer producer = new Producer();

    private Consumer consumer = new Consumer();

    @Data
    public class Producer {
        private String clientId;
        private String defaultTopic;
    }

    @Data
    public class Consumer {
        private String clientId;
        private String defaultTopic;
    }
}
